/*
 * Copyright 2019 ThoughtWorks, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
$btn-group-bg: $go-white;
$btn-border: $border-grey;

.btn-group {
  border:        1px solid $btn-border;
  border-radius: $global-border-radius;
  display:       inline-flex;
  background:    $btn-group-bg;
}

.btn {
  border:          0;
  border-left:     1px solid $btn-border;
  cursor:          pointer;
  font-size:       14px;
  padding:         2px 5px;
  flex:            0 1 auto;
  display:         flex;
  justify-content: center;

  &:first-child {
    border-left:   0;
    border-radius: $global-border-radius 0 0 $global-border-radius;
  }
  &:last-child {
    border-radius: 0 $global-border-radius $global-border-radius 0;
  }
  &:focus, &:active {
    outline: 0;
  }
  &:before {
    margin: 0;
  }

}

.plugin-actions {
  float:   right;
  display: flex;

}

.edit-button {
  @include icon-before($type: pencil-square-o, $color: $go-icon-color);
  &:not(.disabled) {
    &:hover {
      &:before {
        color: $go-icon-hover-color;

      }
    }
  }

  &.disabled {
    &:before {
      color: $dark-gray;
    }
  }
}

.delete-button {
  @include icon-before($type: trash, $color: $go-icon-color);
  &:not(.disabled) {
    &:hover {
      &:before {
        color: $go-icon-hover-color;
      }
    }
  }
}

.clone-button {
  @include icon-before($type: clone, $color: $go-icon-color);
  &:hover {
    &:before {
      color: $go-icon-hover-color;
    }
  }

  &.disabled {
    &:before {
      color: $dark-gray;
    }
  }
}

.btn-plugin-status {
  @include icon-before($type: file, $color: $go-icon-color);
  &:hover {
    &:before {
      color: $go-icon-color;
    }
  }

  &.disabled {
    &:before {
      color: $dark-gray;
    }
  }
}

.btn-collapse {
  background: image-url('icon_collapse.svg') no-repeat 10px 5px;
  width:      32px;
  height:     28px;
  padding:    14px 17px;
  display:    inline-block;
  &:hover {
    background: image-url('icon_collapse-hover.svg') no-repeat 10px 5px;
  }
}

.btn-expand {
  background: image-url('icon_expand.svg') no-repeat 10px 5px;
  width:      32px;
  height:     28px;
  padding:    14px 17px;
  display:    inline-block;
  &:hover {
    background: image-url('icon_expand-hover.svg') no-repeat 10px 5px;
  }
}

